const routes = [
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/HomeView.vue'),
    children: [
      {
        path: '/home/index',
        name: 'index',
        component: () => import('../views/home/index.vue'),
      },
      {
        path: '/home/bbt',
        name: 'bbt',
        component: () => import('../views/home/bbt.vue'),
      },
      {
        path: '/home/order',
        name: 'order',
        component: () => import('../views/home/order.vue'),
      },
      {
        path: '/home/mine',
        name: 'mine',
        component: () => import('../views/home/mine.vue'),
      },
      {
        path: '/home',
        redirect: '/home/index'//重定向
      },
      {
        path: '*',
        component: () => import('../views/NotFound.vue')
      }
    ]
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/AboutView.vue')
  },
  {
    path: '/',
    redirect: '/home'//重定向
  },
  {
    path: '*',
    component: () => import('../views/NotFound.vue')
  }
]

export default routes;